SDL_CONFIG = sdl-config

DEFAULT_CFLAGS = $(shell $(SDL_CONFIG) --cflags)

MORE_CFLAGS = -O2 -g

CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)

CXXFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) -fno-exceptions -fno-rtti

LDLIBS = -lSDL_gfx -lSDL_image -lSDL_ttf \
	-lfreetype -lpng -ljpeg -lz -lm $(shell $(SDL_CONFIG) --libs)

all: main 

main: main.c util.c libmpdclient.c sdl.c loadscreen.c errorscreen.c menuFiles.c menuPlaylist.c

clean:
	rm -f *~
	rm -f *.o main
